import BaseView from "../baseView.js";

export default  class studentView extends BaseView{
    render(){
      this.$app.html(`
      <form class="layui-form" action="" id="xiugai">
      <div class="layui-form-item">
          <label class="layui-form-label">学号</label>
          <div class="layui-input-block">
              <input id="Gid" type="text" name="title" required lay-verify="required" value="${data.id}" autocomplete="off"
                  class="layui-input">
          </div>
      </div>
      <div class="layui-form-item">
          <label class="layui-form-label">姓名</label>
          <div class="layui-input-block">
              <input id="Gname"  type="text" name="title" required lay-verify="required" value="${data.name}" autocomplete="off"
                  class="layui-input">
          </div>
      </div>
      <div class="layui-form-item">
          <label class="layui-form-label">年龄</label>
          <div class="layui-input-block">
              <input id="Gage"  type="text" name="title" required lay-verify="required" value="${data.age}" autocomplete="off"
                  class="layui-input">
          </div>
      </div>
      <div class="layui-form-item">
          <label class="layui-form-label">性别</label>
          <div class="layui-input-block">
              <input id="Ggender"  type="text" name="title" required lay-verify="required" value="${data.gender}" autocomplete="off"
                  class="layui-input">
          </div>
      </div>
      <div class="layui-form-item">
          <label class="layui-form-label">成绩</label>
          <div class="layui-input-block">
              <input id="Gscore"  type="text" name="title" required lay-verify="required" value="${data.score}" autocomplete="off"
                  class="layui-input">
          </div>
      </div>
      <div class="layui-form-item">
          <label class="layui-form-label">地址</label>
          <div class="layui-input-block">
              <input id="Gaddress"  type="text" name="title" required lay-verify="required" value="${data.address}" autocomplete="off"
                  class="layui-input">
          </div>
      </div>
      <div class="layui-form-item">
          <label class="layui-form-label">电话</label>
          <div class="layui-input-block">
              <input id="GphoneNumber" type="text" name="title" required lay-verify="required" value="${data.phoneNumber}" autocomplete="off"
                  class="layui-input">
          </div>
      </div>
  </form>
      `)
    }
    handle(){
      $.ajax({
          type:"get",
          url:"/student/shows",
          dataType:"json",
          success:(data)=>{
               console.log(data);
          }
      })
    }
}
